home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
Jogos de Azar
/
blackjack1.swf
/
scripts
/
frame_14
/
DoAction.as
Wrap
Text File
|
2006-01-17
|
3KB
|
101 lines
function guessWhoDealer()
{
if(Dcard0 + Dcard1 == 21)
{
if(Pcard0 + Pcard1 == 21)
{
_root.statusMov.play();
_root.statusMov.statusCopy = "You and Dealer have Blackjack! Push.";
Sponds(3);
_root.gotoAndStop("end");
return undefined;
}
if(insurance == true)
{
if(Ptotal >= 22)
{
_root.statusMov.play();
_root.statusMov.statusCopy = "Your Bust! Dealer wins.";
Sponds(1);
_root.gotoAndStop("end");
return undefined;
}
_root.statusMov.play();
_root.statusMov.statusCopy = "Dealer has Blackjack! You claim insurance.";
Sponds(3);
_root.gotoAndStop("end");
return undefined;
}
_root.statusMov.play();
_root.statusMov.statusCopy = "Dealer wins with Blackjack!";
Sponds(1);
_root.gotoAndStop("end");
return undefined;
}
if(Ptotal >= 22)
{
_root.statusMov.play();
_root.statusMov.statusCopy = "Your Bust! Dealer wins.";
Sponds(1);
_root.gotoAndStop("end");
return undefined;
}
if(Dtotal >= 22)
{
_root.statusMov.play();
_root.statusMov.statusCopy = "Dealer Busts. You win $" + currentBet[0] + ".";
Sponds(2);
_root.gotoAndStop("end");
return undefined;
}
if(Pcard0 + Pcard1 == 21)
{
Cool = Math.floor(currentBet[0] * 1.5);
_root.statusMov.play();
_root.statusMov.statusCopy = "Blackjack! You win $" + Cool + "!";
Sponds(4);
_root.gotoAndStop("end");
return undefined;
}
if(16 >= Dtotal)
{
_root.nextFrame();
return undefined;
}
if(Dtotal == Ptotal)
{
_root.statusMov.play();
_root.statusMov.statusCopy = "Your hand matches Dealers. Push.";
Sponds(3);
_root.gotoAndStop("end");
return undefined;
}
if(Ptotal < Dtotal)
{
_root.statusMov.play();
_root.statusMov.statusCopy = "Dealer wins draw with " + Dtotal + ".";
Sponds(1);
_root.gotoAndStop("end");
return undefined;
}
_root.statusMov.play();
_root.statusMov.statusCopy = "You win draw with " + Ptotal + ".";
Sponds(2);
_root.gotoAndStop("end");
}
function guessWhoPlayer()
{
if(Pcard0 + Pcard1 == 21)
{
_root.gotoAndPlay("dealer");
}
if(Ptotal == 21)
{
_root.gotoAndPlay("dealer");
}
if(Ptotal >= 22)
{
_root.gotoAndPlay("dealer");
}
}